<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id = 'i1'>欢迎光临</div>
    <script>
        function f() {
            var tag =document.getElementById('i1');
            var content = tag.innerText;
            var f = content.charAt(0);
            var l = content.substring(1,content.length);
            var new_content = l + f;
            tag.innerText = new_content
        }
        setInterval('f()',500)
    </script>
</body>
</html>